const { ethers } = require('ethers');
const config = require('./config');

const Web3 = require('web3');
const main = async () => {
    let txhash = "0xf28f764935db05c0cf366ce305c6ffb12c8fadedc71bcd75136dc909bbcd25ce";
   // txhash = "0x293b4f9923eea74deb2dc9830fc5a8ef801af2b8a0a2728fc39c7ad8fefcadd6";
  //  txhash = "0xfd37ce11d4e588e948ea446d25e830d51a745089b1a707d93061a89346a9e5de"
  //  let provider = new ethers.JsonRpcProvider(config.nodeUrl);
  //  let ret = await provider.getTransactionReceipt(txhash);
  //  console.log('ret: ', ret);

    let web3 = new Web3(new Web3.providers.HttpProvider(config.nodeUrl));
    let tx = await web3.eth.getTransaction(txhash);
    console.log('tx: ', tx);

    let receipt = await web3.eth.getTransactionReceipt(txhash);
    console.log('receipt: ', receipt);

    console.log('receipt: ', receipt.logs[0].topics)
}



main();